$ = function(id) {return document.getElementById(id);};
forEach = function(seq,func){
	for (var i = 0; i < seq.length; i++){
		func(seq[i], i);
	}
}
cont = function (val, seq){
	for (var i = 0; i < seq.length; i++){
		if (val == seq[i]) return true;
	}
	return false;
}

getByPoint = function(map, point){
	return map[point.x][point.y];
}	

setByPoint = function(map, point, value){
	map[point.x][point.y] = value;
}

isInBounds = function(map, point){
	return point.x > -1 && point.y > -1 && point.x < map.length && point.y < map[point.x].length; 
}	

pi=Math.PI;	